# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html

import scrapy

from scrapy import Item, Field
# from scrapy import Item, Field
from scrapyluke.items import SqlItem
from scrapyluke.commonfun import to_str
# class zhaopin(scrapy.Item):
#     # define the fields for your item here like:
#     # name = scrapy.Field()
#     job_url = scrapy.Field()
#     url = scrapy.Field()
#     job_resume = scrapy.Field()
#     job_name = scrapy.Field()
#     job_time = scrapy.Field()
#
#
#
# class JobInfo(scrapy.Item):
#     job_salary = scrapy.Field()
#     job_resume = scrapy.Field()
#
# class JobInfoItem(scrapy.Item):
#     job_name = scrapy.Field()
#     url = scrapy.Field()


class jobinfoitem(Item):
    job_category = Field()  # 工作类别
    url = Field()  # 内容页面的url
    job_name = Field()  # 工作名称
    job_company = Field()  # 招聘企业名称
    job_update = Field()  # 更新时间
    job_salary = Field()  # 薪酬
    job_location = Field()  # 招聘城市城区
    job_experience = Field()  # 工作经历
    job_recruNums = Field()  # 招聘人数
    job_nature = Field()  # 工作性质（全职、兼职等）
    job_miniEdu = Field()  # 最低学历
    job_detail = Field()  # 其他细节
    job_benefits = Field()  # 工作福利
    job_reqSex = Field()  # 性别要求
    job_reqAge = Field()  # 年龄要求
    job_reqLan = Field()  # 语言要求

    job_desc_loc = Field()  # 工作详细地址
    job_desc = Field()  # 描述
    job_desc_resp = Field()  # 工作职责
    job_desc_req = Field()  # 工作要求

    job_kind = Field()
    job_code = Field()
    job_district = Field()
    job_explain = Field()
    job_issuedate = Field()
    job_vp = Field()
    job_ex = Field()

# 企业信息
class cominfoitem(Item):
    url = Field()  # 内容页url
    com_name = Field()  # 企业名称
    com_benefits = Field()  # 企业福利
    com_detail = Field()  # 企业细节
    com_intro = Field()  # 企业介绍
    com_level = Field()  # 企业VIP级别-Ex：chinahr的VIP2
    com_bene_other = Field()  # 其他福利
    com_nature = Field()  # 企业性质-Ex：国有、私有等
    com_size = Field()  # 企业规模-Ex：100-199人
    com_industry = Field()  # 企业所属行业
    com_address = Field()  # 企业地址
    com_zipCode = Field()  # 企业地址邮编
    com_link = Field()  # 公司网址

    com_code = Field()
    com_vp = Field()
    bus_kind = Field()
    bus_arr = Field()
    insert_time = Field()


class com_info(Item):
    com_nameone = Field()

class hc360cominfo(Item):
    id = Field()
    url = Field()
    insert_time = Field()
    com_name = Field()
    com_introduction = Field()
    com_address = Field()
    com_contact = Field()
    com_product = Field()
    com_industry = Field()
    com_type = Field()
    com_model = Field()
    com_regaddress = Field()
    com_mngaddress = Field()
    com_buildtime = Field()
    com_representative = Field()
    com_staffnum = Field()
    com_annualturnover = Field()
    com_brand = Field()
    com_regcapital = Field()
    com_customer = Field()
    com_market = Field()
    com_export = Field()
    com_import = Field()
    com_bank = Field()
    com_bankaccount = Field()
    com_isoem = Field()
    com_developmentnum = Field()
    com_monthlyproduction = Field()
    com_roomarea = Field()
    com_qualitycontrol = Field()
    control = Field()
    com_mngcertification = Field()
    com_credentials = Field()
    com_certificates = Field()
    com_reference = Field()
    memberevaluation = Field()


# class xypjwe43b(Item):
#     url = Field()
#     insert_time = Field()
#     name = Field()
#
#     evaluationrank_cn = Field()
#     evaluationrank = Field()
#     certificatenumber_cn = Field()
#     certificatenumber = Field()
#     issuedate_cn = Field()
#     issuedate = Field()
#     validperiod_cn = Field()
#     validperiod = Field()
#     issueunit_cn = Field()
#     issueunit = Field()
#     evaluationunit_cn = Field()
#     evaluationunit = Field()
#
#     registrationnumber_cn = Field()
#     registrationnumber = Field()
#     organizationcode_cn = Field()
#     organizationcode = Field()
#     legalrepresentative_cn = Field()
#     legalrepresentative = Field()
#     registeredcapital_cn = Field()
#     registeredcapital = Field()
#     sector_cn = Field()
#     sector = Field()
#     website_cn = Field()
#     website = Field()
#     region_cn = Field()
#     region = Field()
#     postcode_cn = Field()
#     postcode = Field()
#     businessaddress_cn = Field()
#     businessaddress = Field()
#     mainbusiness_cn = Field()
#     mainbusiness = Field()


class xypjweb(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 公司名称
    company_name = Field()
    # 评价等级
    evaluation_grade = Field()
    evaluation_grade_en = Field()
    # 证书编号
    certificate_number = Field()
    certificate_number_en = Field()
    # 颁发日期
    date_of_issue = Field()
    date_of_issue_en = Field()
    # 有效期至
    valid_until = Field()
    valid_until_en = Field()
    # 发证单位（协会）
    the_issuing_unit__association_ = Field()
    the_issuing_unit__association_en = Field()
    # 评价单位（信用机构或协会）
    the_evaluation_unit__credit_institution_or_association_ = Field()
    the_evaluation_unit__credit_institution_or_association_en = Field()
    # 工商注册号
    business_registration_no = Field()
    business_registration_no_en = Field()
    # 组织机构代码
    organization_code = Field()
    organization_code_en = Field()
    # 法人代表
    the_legal_representative = Field()
    the_legal_representative_en = Field()
    # 注册资本
    registered_capital = Field()
    registered_capital_en = Field()
    # 所属行业
    industry = Field()
    industry_en = Field()
    # 企业网址
    website = Field()
    website_en = Field()
    # 所属地区
    area = Field()
    area_en = Field()
    # 邮编
    zip_code = Field()
    zip_code_en = Field()
    # 经营地址
    operating_address = Field()
    operating_address_en = Field()
    # 主营业务
    the_main_business = Field()
    the_main_business_en = Field()


class chinatax(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 纳税人识别号
    taxpayer_identification_number = Field()
    # 纳税人名称
    taxpayer_s_name = Field()
    # 评价年度
    annual_evaluation = Field()

class taxwf(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 纳税人名称
    taxpayer_s_name = Field()
    # 纳税人识别号
    taxpayer_identification_number = Field()
    # 组织机构代码
    organization_code = Field()
    # 注册地址
    registered_address = Field()
    # 法定代表人或者负责人姓名、性别、证件名称及号码
    representative_name__gender__name_and_number = Field()
    # 负有直接责任的财务负责人姓名、性别、证件名称及号码
    responsible_finance_name__gender__name_and_number = Field()
    # 负有直接责任的中介机构信息及其从业人员信息
    responsibility_information = Field()
    # 案件性质
    the_nature_of_the_case = Field()
    # 税务处理处罚情况
    the_tax_treatment_of_punishment = Field()
    # 性别
    sex = Field()

class mittdianxin(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    com_code = Field()
    com_name = Field()
    bus_kind = Field()
    bus_arr = Field()
    com_vp = Field()

class mittcheliang(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 企业名称
    the_name_of_the_enterprise = Field()
    # 商标
    trademark = Field()
    # 产品名称
    product_name = Field()
    # 产品型号
    product_model = Field()
    # 变更内容
    change_content = Field()
    # 扩展内容
    extended_content = Field()
    # 备注
    remarks = Field()
    #目录序号
    serial_number = Field()


class mittdianzi(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 名称
    name = Field()
    # 所在省份
    province = Field()
    # 许可证号
    license_key = Field()
    # 批准日期
    approval_date = Field()


class miitnongyao(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 序号
    serial_number = Field()
    # 省份
    province = Field()
    # 企业名称
    the_name_of_the_enterprise = Field()
    # 产品类别
    product_categories = Field()
    # 产品名称
    product_name = Field()
    # 生产类型
    production_type = Field()
    # 执行标准
    the_implementation_of_standards = Field()
    # 生产批件号
    production_approval_number = Field()
    # 发证日期
    the_date_of_issuance = Field()
    # 有效期
    valid = Field()

class miitbaozha(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 进出口申请企业
    for_the_import_and_export_enterprises = Field()
    # 审批年度
    the_annual_examination_and_approval = Field()
    # 审批编号
    approval_number = Field()
    # 合同编号
    the_contract_no_ = Field()
    # 贸易方式
    trade_mode = Field()
    # 申请进口用途及理由
    for_the_purpose_of_import_and_reason = Field()
    # 申请日期
    date_of_application = Field()
    # 工信部审核状态
    the_ministry_of_state_audit = Field()

class aqbzh(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 企业名称
    the_name_of_the_enterprise = Field()
    # 地址
    address = Field()
    # 法定代表人
    the_legal_representative = Field()
    # 达标等级
    standard_grade = Field()


class txjs(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 资格类型
    qualification_type = Field()
    # 企业名称
    the_name_of_the_enterprise = Field()
    # 资质证书编号
    qualification_certificate_number = Field()
    # 资质等级
    the_level_of_qualification = Field()
    # 发证日期
    the_date_of_issuance = Field()
    # 证书有效期
    the_certificate_is_valid = Field()
    # 业务范围
    scope_of_business = Field()


class cefpr(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 序号
    serial_number = Field()
    # 备案号
    record_number = Field()
    # 企业名称
    the_name_of_the_enterprise = Field()
    # 备案地址
    for_the_record_ = Field()
    # 备案产品
    for_products = Field()
    # 有效期至
    valid_until = Field()
    # 证书状态
    certificate_status = Field()
    # 主要出口国家或地区
    the_main_export_countries_or_regions = Field()


class wenshu(Item):
    # 数据源的获取时间
    insert_time = Field()
    # 数据源的url
    url = Field()
    # 正文
    text = Field()
    # 案件类型
    case_type = Field()
    # 裁判日期
    judgment_date = Field()
    # 案件名称
    case_name = Field()
    # 审判程序
    trial_procedure = Field()
    # 文书号
    document_number = Field()
    # 案号
    case_no_ = Field()
    # 法院名称
    court_name = Field()
    # 关联文案
    associate_copy = Field()


class GsxtGovItem(Item):
    # datetime.datetime.now()
    insert_time = Field()
    # 企业基本信息|抽查检查信息|....
    response_name = Field()
    # response.body
    content = Field()
    # url
    url = Field()
    # 公司名称,只能是中文，注：去掉空格
    company_name = Field()


class GsxtGovItems(SqlItem):
    # 企业名称
    company_name = Field()
    # response的名称(以|为分隔符): 基本信息|主要人员...
    response_name = Field()
    # response.body
    content = Field()